package edu.dayu.util;

import lombok.Data;

@Data
public class ClubException extends RuntimeException {
    private Integer code;

    public ClubException(Integer code ,String message){
        super(message);
        this.code = code;
    }

    public ClubException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }

    @Override
    public String toString() {
        return "ClubException{" +
                "code=" + code +
                ", message=" + this.getMessage() +
                '}';
    }
}
